package com.lottery.entity;

import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;

@TableName("lottery_records")
public class LotteryRecord {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    @TableField("user_id")
    private Long userId;
    
    @TableField("prize_id")
    private Long prizeId;
    
    @TableField("prize_name")
    private String prizeName;
    
    @TableField("is_winner")
    private Boolean isWinner;
    
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    // 构造函数
    public LotteryRecord() {}

    public LotteryRecord(Long userId, Long prizeId, Boolean isWinner) {
        this.userId = userId;
        this.prizeId = prizeId;
        this.isWinner = isWinner;
    }
    
    public LotteryRecord(Long userId, String prizeName, Boolean isWinner) {
        this.userId = userId;
        this.prizeName = prizeName;
        this.isWinner = isWinner;
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public Long getPrizeId() {
        return prizeId;
    }
    
    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }
    
    public String getPrizeName() {
        return prizeName;
    }
    
    public void setPrizeName(String prizeName) {
        this.prizeName = prizeName;
    }
    
    public Boolean getIsWinner() {
        return isWinner;
    }
    
    public void setIsWinner(Boolean isWinner) {
        this.isWinner = isWinner;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}